package com.pomr.service.common;

import java.util.List;

import com.pomr.model.form.AgencyUp;
import com.pomr.model.form.PersonRecordUp;
import com.pomr.model.simstorage.SimFlow;
import com.pomr.model.simstorage.SimStorageDetail;
import com.pomr.model.sys.Agency;
import com.pomr.model.sys.User;

public interface CommonService {
	/**
	 * 通过身份证号或者姓名查询患者领用的设备附带的SIM卡
	 * @param cont 身份证号或者姓名
	 * @return
	 * @throws Exception
	 */
	public List findSimByIdCard(String cont) throws Exception;
	
	/**
	 * 获取用户可支配角色信息
	 * @param user
	 * @return
	 * @throws Exception
	 */
	public List findRolesByUser(User user) throws Exception;
	
	/**
	 * 上传健康档案信息
	 * @param prus
	 * @return
	 * @throws Exception
	 */
	public boolean loadPersonRecords(List<PersonRecordUp> prus) throws Exception;
	
	/**
	 * 上传机构信息
	 * @param ag
	 * @return 主键
	 * @throws Exception
	 */
	public int loadAgency(AgencyUp agu) throws Exception;
	
	public Agency findAgency(int key) throws Exception;

	/**
	 * 获取所有的SIM卡详细信息
	 * @return
	 * @throws Exception
	 */
	public List<SimStorageDetail> findAllSims() throws Exception;

	/**
	 * 保存流量信息
	 * @param flows
	 * @return
	 * @throws Exception
	 */
	public boolean saveFlows(List<SimFlow> flows) throws Exception;

	/**
	 * 清空流量信息
	 * @return
	 * @throws Exception
	 */
	public boolean clearFlows() throws Exception;

}
